/* vim:ft=objc:
 * $Id: ConfigController.h 114 2005-05-12 05:15:40Z bmoore $
 *
 * Copyright (c) 2004, 2005  Branden J. Moore.
 *
 * This file is part of MacBiff, and is free software; you can redistribute
 * it and/or modify it under the terms of the GNU General Public License
 * version 2 as published by the Free Software Foundation.
 *
 * MacBiff is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with MacBiff; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307 USA.
 *
 */

#import <Cocoa/Cocoa.h>
#import "AccountInfo.h"


@interface ConfigController : NSObject
{
	IBOutlet NSWindow *configWindow;
	NSToolbar *toolbar;
	NSView *currentView;
	NSMutableDictionary *tbItems; /* Items to be in the toolbar */

	IBOutlet NSButton *accountAddButton;
	IBOutlet NSStepper *accountCheckIntervalStepper;
	IBOutlet NSTextField *accountCheckIntervalTextField;
	IBOutlet NSButton *accountDefaultPluginButton;
	IBOutlet NSButton *accountDelButton;
	IBOutlet NSTableView *accountListTableView;
	IBOutlet NSOutlineView *accountMailboxOutlineView;
	IBOutlet NSTextField *accountNameTextField;
	IBOutlet NSTableView *accountPluginTableView;
	IBOutlet NSTabView *accountTabView;
	IBOutlet NSPopUpButton *accountTypePopUp;
	IBOutlet NSView *accountTypeView;
	IBOutlet NSView *accountView;
	AccountInfo *currentAccountInfo;
	NSMutableArray *accountList;

	IBOutlet NSWindow *newAccountSheet;
	IBOutlet NSTextField *newAccountNameTextField;
	IBOutlet NSPopUpButton *newAccountTypePopUp;

	IBOutlet NSButton *generalChangeColorButton;
	IBOutlet NSTableView *generalDefaultPluginTableView;
	IBOutlet NSTextField *generalMailAppTextField;
	IBOutlet NSButton *generalShowActivityButton;
	IBOutlet NSButton *generalShowIconButton;
	IBOutlet NSButton *generalShowTextButton;
	IBOutlet NSButton *generalShowTotalButton;
	IBOutlet NSView *generalView;

	IBOutlet NSTextField *pluginAuthorTextField;
	IBOutlet NSView *pluginConfigureView;
	IBOutlet NSTextField *pluginNameTextField;
	IBOutlet NSTableView *pluginTableView;
	IBOutlet NSTextField *pluginTypeTextField;
	IBOutlet NSButton *pluginURLButton;
	IBOutlet NSTextField *pluginURLTextField;
	IBOutlet NSTextField *pluginVersionTextField;
	IBOutlet NSView *pluginView;
}


- (void) setAccountList: (NSMutableArray*) list;
- (IBAction)noOp:(id)sender;
- (IBAction)configure:(id)sender;
- (void) configureAccount: (id)sender;

- (IBAction)accountAddAccount:(id)sender;
- (IBAction)accountDelAccount:(id)sender;
- (IBAction)accountSetCheckInterval:(id)sender;
- (IBAction)accountSetDefaultPlugins:(id)sender;
- (IBAction)accountSetName:(id)sender;
- (IBAction)accountSetType:(id)sender;
- (IBAction)accountStepCheckInterval:(id)sender;
- (IBAction)accountSelectAccount:(id)sender;

- (void)sheetDidEnd:(NSWindow *)sheet
	 returnCode:(int)returnCode
	contextInfo:(void *)contextInfo;
- (IBAction)newAccountDismiss:(id)sender;
- (IBAction)newAccountOK:(id)sender;

- (IBAction)generalChooseMailApp:(id)sender;
- (IBAction)generalSetChangeColor:(id)sender;
- (IBAction)generalSetMailApp:(id)sender;
- (IBAction)generalSetShowActivityOnCheck:(id)sender;
- (IBAction)generalSetShowIcon:(id)sender;
- (IBAction)generalSetShowText:(id)sender;
- (IBAction)generalSetShowTotal:(id)sender;

- (IBAction)pluginSelectPlugIn:(id)sender;
- (IBAction)pluginGoURL:(id)sender;

- (void) setView: (NSView*)view;
- (void) setViewToGeneral;
- (void) setViewToAccounts;
- (void) setViewToPlugIns;

@end

extern ConfigController *configController;

